package com.example.demo.utils;

import com.alibaba.fastjson.JSON;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;


//Response 返回JSON格式工具类
public class ResponseBackUtil {
    public static void back(HttpServletResponse response,Object object) throws IOException {
        response.setCharacterEncoding("utf8");
        response.getWriter().write(JSON.toJSONString(object));
    }
}
